package com.shenzhenai.module_design_partterns.class1;

/**
 * @author huangzehui
 * @date 8/8/2025 上午12:28 周五
 * @description 折扣
 */
public class CashRebate extends CashSuper {

    // 折扣率
    private double rebate = 1d;

    public CashRebate(double rebate) {
        this.rebate = rebate;
    }

    @Override
    public double acceptCash(double money) {
        return rebate * money;
    }
}
